package cjq.demo.spring.aop;

/**
 * author: cjianquan
 * date: 2016/9/9
 */
public class GreetingNoImpl {
    public void sayHello(String name) {
        before();
        System.out.println("Hello! " + name);
        after();
//        throw new RuntimeException("Error"); // 故意抛出一个异常，看看异常信息能否被拦截到
    }

    private void before() {
        System.out.println("Before");
    }

    private void after() {
        System.out.println("After");
    }
}
